<%= render :partial => 'edit_channel_header' -%>

<%- form_for_channel do |f| -%>
  <%= f.error_messages -%>
  <%= render :partial => 'edit_name', :locals => {:f => f} -%>
  <%= render :partial => 'edit_protocol', :locals => {:f => f} -%>
  <%= render :partial => 'edit_priority', :locals => {:f => f} -%>
  <%= render :partial => 'edit_application', :locals => {:f => f} -%>
  <%= render :partial => 'edit_direction' -%>
  <%= render :partial => 'edit_address', :locals => {:f => f} -%>
  <%- f.fields_for :configuration do |c| -%>
    <p>
    <b>Leave blank if you don't want to change the password</b><br/>
    <%= c.label :password -%><br/>
    <%= c.password_field :password -%>
    </p>
    <p>
    <%= c.label :password_confirmation -%><br/>
    <%= c.password_field :password_confirmation -%>
    </p>
  <%- end -%>
  <%= render :partial => 'edit_costs', :locals => {:f => f} -%>
  <%= render :partial => 'shared/edit_custom_attributes', :locals => {:f => f, :entity => @channel, :as_restriction => true} -%>
  <%= render :partial => 'edit_ao_rules', :locals => {:f => f} -%>
  <%= render :partial => 'edit_at_rules', :locals => {:f => f} -%>
  <%= channel_submit_tag -%>
<%- end -%>

<%= link_to 'Go back', :controller => :home, :action => :channels -%>
